<template>
	<view class="index-content">
		<view class="content">
			<scroll-view class="custom-scroll" :scroll-y="true" :show-scrollbar="true">
				<item v-for="(item,key) in list" :key="key" :item="item">

				</item>
			</scroll-view>
		</view>
	</view>
</template>

<script>
	import btn1 from "@/static/index/btn1.png"
	import btn2 from "@/static/index/btn2.png"
	import btn3 from "@/static/index/btn3.png"
	import btn4 from "@/static/index/btn4.png"
	import item from "./components/item.vue"
	import {getProjectList} from "@/api/index";
	export default {
		components: {
			item
		},
		data() {
			return {
				title: 'Hello',
				btn1,
				btn2,
				btn3,
				btn4,
				list:[]
			}
		},
		onLoad() {
			this.init()

		},
		methods: {
			async init() {
				const res = await getProjectList();
				console.log(res);
				this.list = res.data;

			},
			gologin() {
				console.log(123);
				uni.navigateTo({
					url: '/pages/login/login'
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.index-content {
		height: 100vh;
		background-image: url('/static/project/bj.png');
		background-repeat: no-repeat;
		background-size: 100% auto;
		background-position: top center;

		
	}



	.custom-scroll {
		position: absolute;
		top: 300rpx;
		bottom: 60rpx;
		left: 0;
		right: 0;
		// width: 100%;
		// height: 200px;
		// overflow-y: auto;
	}

	// .custom-scroll::-webkit-scrollbar {
	// 	width: 8px;
	// }

	// .custom-scroll::-webkit-scrollbar-track {
	// 	background-color: #f0f0f0;
	// 	border-radius: 4px;
	// }

	// .custom-scroll::-webkit-scrollbar-thumb {
	// 	background-color: #ccc;
	// 	border-radius: 4px;
	// }

	// .custom-scroll::-webkit-scrollbar-thumb:hover {
	// 	background-color: #999;
	// }

	.item {
		height: 50px;
		line-height: 50px;
		text-align: center;
		color: #fff;
		border-bottom: 1px solid #eee;
	}
</style>